import Base from '../../static/js/base'
class Index extends Base{
	constructor() {
		super();
	}
	// 轮播图
	baner_list(callBack) {
		var that = this;
		var params = {
		  url: 'index/baner_list',
		  sCallBack: function (res) {
			callBack && callBack(res.data);
		  }
		};
		that.request(params);
	};
	// 精品推荐
	recommend_product_list(callBack) {
		var that = this;
		var params = {
		  url: 'index/recommend_product_list',
		  sCallBack: function (res) {
			callBack && callBack(res.data);
		  }
		};
		that.request(params);
	};
	// 热卖单品
	best_product_list(callBack) {
		var that = this;
		var params = {
		  url: 'index/best_product_list',
		  sCallBack: function (res) {
			callBack && callBack(res.data);
		  }
		};
		that.request(params);
	};
	// 热卖单品
	product_type_list(callBack) {
		var that = this;
		var params = {
		  url: 'index/product_type',
		  sCallBack: function (res) {
			callBack && callBack(res.data);
		  }
		};
		that.request(params);
	};
	// 热搜列表
	top_search_list(callBack) {
		var that = this;
		var params = {
		  url: 'index/top_search_list',
		  data:{
			  searches_status:1
		  },
		  sCallBack: function (res) {
			callBack && callBack(res.data);
		  }
		};
		that.request(params);
	};
	// 商品列表
	product_list(page,callBack) {
		var that = this;
		var params = {
		  url: 'index/product_list',
		  data:{
			  type:1,
			  page:page,
		  },
		  sCallBack: function (res) {
			callBack && callBack(res.data);
		  }
		};
		that.request(params);
	};
	// 我的信息
	my(callBack) {
		var that = this;
		var params = {
		  url: 'login/my',
		  method:'POST',
		  sCallBack: function (res) {
			callBack && callBack(res.data);
		  }
		};
		that.request(params);
	};
}

export default Index	